import * as React from 'react';
import { useAppSelector } from '../../../app/hooks';
import PositionGrid from '../ui/PositionGrid';
import { selectPositions } from '../domain/positionsSlice';
// import { PositionInfo } from '../domain/domain.model';
// import { PositionRow } from '../ui/ui.model';

// function mapDomainPositionsToUIPositions(positions: PositionInfo[]): PositionRow[] {
//     return positions.map((position: PositionInfo) => ({
//         id: position.id,
//         status: position.,
//         openTime: position.,
//         closeTime: position.,
//         balanceDelta: position.,
//         balanceDeltaPercent: position.
//     }))
// }

const PositionGridContainer = (): React.ReactElement => {
    const positions = useAppSelector(selectPositions);

    return (
        <PositionGrid rows={positions} loading={false} />
    )
}

export default PositionGridContainer;